﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucProcducts.ascx.cs" Inherits="Client_UserControl_ucProcducts" %>
<style type="text/css">
    .style1
    {
        width: 100%;
    }
</style>
<p>
    &nbsp;</p>
<table id="tablesx" width="100%" cellspacing="0" cellpadding="5">
    <tr>
        <%--<td>
            <table class="style1">
                <tr>
                    <td>
                        <b style="color: Black; font-size: 14px; font-weight: normal">Tuỳ chọn :</b>
                    </td>
                    <td>
                        <asp:DropDownList ID="drPriceFrom" runat="server">
                            <asp:ListItem>Giá từ...</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:DropDownList ID="drPriceTo" runat="server">
                            <asp:ListItem>Giá đến...</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:Button ID="bttim" runat="server" Text="Tìm kiếm" OnClick="bttim_Click" />
                    </td>
                </tr>
            </table>
        </td>--%>
        <td align="right" runat="server" id="tdSort">
            <table>
                <tr>
                    <td>
                        <b style="color: Black; font-size: 14px; font-weight: normal">Sort by:&nbsp;</b>
                        <asp:DropDownList ID="cboSortBy" runat="server" Style="width: 119px;">
                            <asp:ListItem Value="ItemName" Text="Name"></asp:ListItem>
                            <asp:ListItem Value="BaseSellingPrice" Text="Price"></asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;<asp:ImageButton ID="btnSortedAsc" runat="server" Style="border-width: 0px;
                            height: 16px;" ToolTip="Ascending" ImageUrl="~/images/view-sort-ascending.png"
                            OnClick="btnSortedAsc_Click" />
                        <asp:ImageButton ID="btnSortDesc" runat="server" Style="border-width: 0px; width: 13px;
                            height: 16px;" ToolTip="Desceding" ImageUrl="~/images/descending.png" Width="16px"
                            OnClick="btnSortDesc_Click" />
                        &nbsp;&nbsp;
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            <table id="ta_grd">
                <asp:ListView runat="server" ID="lvItems" ItemPlaceholderID="groupPlaceholder" GroupItemCount="4"
                    GroupPlaceholderID="layoutTemplate" OnPagePropertiesChanged="lvItems_PagePropertiesChanged">
                    <LayoutTemplate>
                        <table id="layoutTemplate" runat="server" border="0" cellpadding="0" cellspacing="0">
                        </table>
                    </LayoutTemplate>
                    <GroupTemplate>
                        <tr>
                            <div id="groupPlaceholder" runat="server">
                            </div>
                        </tr>
                    </GroupTemplate>
                    <ItemTemplate>
                        <td style="padding: 0 0 15px 15px;">
                            <asp:HyperLink ID="lnkItemDetails" runat="server" NavigateUrl=''>
                                <div class="productItemStyle" onmouseover="javascript:this.style.background='#e5f4ff';this.style.border='solid 1px #3399cc';"
                                    onmouseout="javascript:this.style.background='#FFFFFF';this.style.border='solid 1px #cccccc';this.style.color='#353f45';"
                                    price='<%# Eval("BaseSellingPrice") %>' matchedprice='0' code='<%# Eval("ItemID") %>'>
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td align="center" style="padding: 5px">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="5">
                                                    <tr>
                                                        <td style="width: 60%">
                                                            <%-- <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/ItemDetail.aspx?id=" + Eval("ItemID") + "&keepThis=true&TB_iframe=true&width=800&height=500" %>'
                                                                CssClass="thickbox" ToolTip="CHI TIẾT">--%>
                                                            <asp:HyperLink ID="HyperLink1" rel="lightbox-mygallery" title='<%# Eval("ItemName") %>'
                                                                runat="server" NavigateUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/images/items/" + Eval("ImageURL") + "&width=500&heigh=500&dd=true" %>'>
                                                                <asp:Image ID="img" runat="server" Width="100%" ImageUrl='<%# "~/ImageProcess.ashx?file=" + "~/Admin/images/items/" + Eval("ImageURL") + "&width=100&heigh=100&dd=true" %>'
                                                                    AlternateText="No Image" /></asp:HyperLink>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:HyperLink ID="various3" CssClass="iframeDetails" runat="server" NavigateUrl='<%# "~/DetailProduct.aspx?id=" + Eval("ItemID")  %>'>
                                                                <%# Eval("ItemName") %>
                                                            </asp:HyperLink>
                                                        </td>
                                                        <td>
                                                            <span style="color: Red; font-size: 13px; font-weight: bold">
                                                                <%# double.Parse (Eval("BaseSellingPrice").ToString()) %>
                                                                EUR </span>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </asp:HyperLink>
                        </td>
                    </ItemTemplate>
                </asp:ListView>
            </table>
        </td>
    </tr>
    <tr class="paging">
        <td>
            <asp:DataPager ID="DataPagerImages" runat="server" PagedControlID="lvItems" PageSize="15">
                <Fields>
                    <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="False" ShowNextPageButton="False"
                        ShowPreviousPageButton="False" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="False" ShowNextPageButton="False"
                        ShowPreviousPageButton="False" />
                </Fields>
            </asp:DataPager>
        </td>
    </tr>
</table>

<script language="javascript" type="text/javascript">
    function fn_AddToCart(productCodeAndPrice) {
        PageMethods.SetShoppingCartSesstion(productCodeAndPrice, SetShoppingCart);
    }
</script>

